const baseUrl = "https://zb.10soo.cn/";
const request = (method,url, param) => {
    let _url = baseUrl + url;
    return new Promise((resolve, reject) => {
        wx.request({
          url: _url,
          method: method,
          data: param,
          header:  {
            'content-type': 'application/json',
          },
          success(res) {
            resolve(res)
          },
          fail(err) {
            reject(err)
          }
        })
    })
}
const Get = (url, param) => request('GET', url, param);
const Post = (url, param) => request('POST', url ,param);
const Put = (url, param) => request('PUT', url ,param);
export {
    Get,
    Post,
    Put
}
